package com.hotent.bpmx.listener;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.context.ApplicationListener;
import org.springframework.core.Ordered;
import org.springframework.stereotype.Service;

import com.hotent.base.core.engine.freemark.FreemarkEngine;
import com.hotent.base.core.util.AppUtil;
import com.hotent.base.core.util.string.StringUtil;
import com.hotent.bpmx.api.constant.ActionType;
import com.hotent.bpmx.api.event.NotifyTaskModel;
import com.hotent.bpmx.api.event.TaskNotifyEvent;
import com.hotent.bpmx.core.util.BpmUtil;
import com.hotent.org.api.model.User;
import com.hotent.org.api.service.UserService;
import com.hotent.sys.api.jms.JmsProducer;
import com.hotent.sys.api.msg.constants.MsgType;
import com.hotent.sys.api.template.TemplateService;
import com.hotent.sys.api.template.constants.TemplateConstants;
import com.hotent.sys.api.template.model.TemplateVo;
import com.hotent.sys.jms.model.DefaultMsgVo;

import freemarker.template.TemplateException;

@Service
public class TaskNotifyEventListener implements  ApplicationListener<TaskNotifyEvent>,Ordered{
	
	@Resource
	TemplateService templateService;
	
//	@Resource
	JmsProducer jmsProducer;
	@Resource
	private FreemarkEngine freemarkEngine;
	@Resource
	UserService userService;
	
	public void setJmsProducer(JmsProducer jmsProducer){
		this.jmsProducer=jmsProducer;
	}

	@Override
	public int getOrder() {
		return 1;
	}

	@Override
	public void onApplicationEvent(TaskNotifyEvent ev) {
		return;
	}

}
